
#ifndef _CENTRALWIDGET_H_
#define _CENTRALWIDGET_H_

#include "WidgetsApi.hpp"
#include "../OLCore/AbstractWidget.hpp"
#include "../OLCore/AbstractTabWidget.hpp"
#include <QMainWindow>
#include <QToolBar>
#include <QMenu>
#include <QHBoxLayout>
#include <QComboBox>
#include <QCheckBox>

namespace NSWidgets {

	class CentralTabWidget;

	class WIDGETSAPI CentralWidget :
		public NSCore::AbstractWidget
	{
		Q_OBJECT
	private:
		QWidget* m_toolarea{};
		QHBoxLayout* m_toolarea_layout{};
		CentralTabWidget* m_tab_widget{};
		//ViewDirect
		QActionGroup* m_view_group;
		QActionGroup* m_perspective_group;
		QAction* m_view_xoy;
		QAction* m_view_yox;
		QAction* m_view_yoz;
		QAction* m_view_zoy;
		QAction* m_view_zox;
		QAction* m_view_xoz;
		QAction* m_view_xyz;
		QAction* m_view_adapt;
		QAction* m_view_magnify;
		QAction* m_view_shrink;
		//Perspective
		QAction* m_perspective_off;
		QAction* m_perspective_on;
		//Render Option
		QAction* m_render_option;
		QMenu* m_render_option_menu;
		//ViewStyle
		QAction* m_view_node;
		QAction* m_view_mesh;
		QAction* m_view_edge;
		QAction* m_view_solid;
		QAction* m_view_colorbar;
		QAction* m_view_scalebar;
		//Pick Style


	private:
		void centralToolsInit();
		void addTool(QToolBar* _tool);

	signals:
		//ViewDirect
		void actionViewAdapt();
		void actionViewMagnify();
		void actionViewShrink();
		void actionViewDirectionChanged(int /*direction index*/);
		void actionRenderObjectDisplay(QAction* /*QAction* index*/);
		void actionPerspectiveChanged(bool);

	public slots:
		void setTabWidget(QWidget* widget);
		CentralTabWidget* getCentralTabWidget();

	public:
		CentralWidget(QWidget* w = nullptr);
		~CentralWidget();

	public: /*override*/
		virtual inline QString className() override { return "CentralWidget"; };

	};

}

#endif
